using System;
using System.Collections.Generic;
using System.Text;

namespace Demo.Model
{
    public class Person : Pampa.CRUD.Core.IActiveRecord
    {
        private string name;
        private string email;
        private int? age;
        private IList<PersonPhone> phones;

        public Person()
        {
            phones = new List<PersonPhone>();
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        public int? Age
        {
            get { return age; }
            set { age = value; }
        }

        public IList<PersonPhone> Phones
        {
            get { return phones; }
            set { phones = value; }
        }

        public bool IsNew
        {
            get { return true; }
        }

        public void Save()
        {
            // TODO
        }

        public void Delete()
        {
            // TODO
        }

        public void Refresh()
        {
            // TODO
        }

        public void BeginTransaction()
        {
            // TODO
        }

        public void RollBackTransaction()
        {
            // TODO
        }

        public void CommitTransaction()
        {
            // TODO
        }
    }
}
